package day13.thread05;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author Xiao
 * @date 2021/8/6
 */
public class Foodie implements Runnable{
    private ArrayBlockingQueue<String> abq;
    public Foodie(ArrayBlockingQueue<String> abq) {
        this.abq = abq;
    }
    @Override
    public void run() {
        while (true) {
            try {
                abq.take();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("吃货吃了一个汉堡包");
        }
    }
}
